package com.csu.mapper;

import com.csu.entity.Audit;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface AuditMapper {
    //根据Username获取Audit对象
    Audit getAuditByAccountName(String accountName);

    //插入家长Audit对象
    int insertParent(int auditId, String accountName, String password, int roleId, int classId, int studentId);

    //插入老师Audit对象
    int insertTeacher(int auditId, String accountName, String password, int roleId, int classId, int subjectId);

    /**
     * 获取特定class_id所有audit对象
     */
    List<Audit> getParentsListByClassId(int classId);

    /**
     * 获取待审核老师
     */
    List<Audit> getAuditTeacherList();

    /**
     * 删除第audit_id条数据
     */
    int deleteAudit(int auditId);

    /**
     * 通过audit_id获取audit对象
     */
    Audit getAuditByAuditId(int auditId);

    /**
     * 获取audit_id最大值
     */
    int getMaxAuditId();

    /**
     * 获取所有的accountName
     */
    List<String> getAccountNameList();
}
